﻿(function(E, T, $){
var selection = E.mod('Selection'),
	testName = 'PasteText',
	title = '粘贴为纯文本',
	setValue = '<span id="_testPasteText"></span>',
	pastValue= '插入文本，模版内容',
	dom = null,
	node = null,
	cmds = [
		[1500, {fun: function(){
			dom = E.get('document');
			dom.body.innerHTML=setValue;
			node = dom.getElementById('_testPasteText');
			selection.selectNode(node, false);
		}}],
		[300, {name: '#demo-PasteText', type: 'mouseover'}],
		[800, {name: 'a.PasteText', type: 'click'}],
		[300, {fun: function() {
			//设置插入内容
			E.plugin(testName).panel.find('textarea').val(pastValue);
		}}],
		[300, {fun: function() {
			//单击确定按钮
			E.plugin(testName).panel.find('[name=panel-submit]').trigger('click');
		}}]
	];
T.addTest(testName, cmds, title);
})(jQEditor, AutoTest, jQuery);